-- Viral Resistance - T-Engine 4 Module
-- Copyright (C) 2010 Mikolai Fajer
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Mikolai Fajer "yufra"
-- mfajer@gmail.com

newEntity{
	define_as = "BASE_GUN",
	slot = "MAINHAND",
	type = "firearm",
	display = "}", color=colors.UMBER,
	ranged = "gun",
	desc = [[Guns are used to shoot bullets.]],
	-- Just a reminder for what should be in each gun
	combat = {
		range = nil,
		accuracy = nil,
		speed = 10,
	},
}

newEntity{ base = "BASE_GUN",
	define_as = "BASE_PISTOL",
	slot = "MAINHAND",
	subtype="pistol",
	display = "}", color=colors.UMBER,
	encumber = 4,
	combat = {
		range = 10,
		accuracy = 5,
	},
	desc = [[A small pistol.]],
}

newEntity{ base = "BASE_PISTOL",
	name = "Glock 22",
	level_range = {1, 10},
	require = { stat = { str=10 }, },
	cost = 5,
	rarity = 10,
	combat = {
	},
}

newEntity{ base = "BASE_GUN",
	define_as = "BASE_SHOTGUN",
	slot = "MAINHAND",
	forbid = "OFFHAND",
	subtype = "shotgun",
	display = "}", color=colors.GREY,
	encumber = 10,
	combat = {
		range = 5,
		accuracy = 20,
	},
	desc = [[A non-descript shotgun.]],
}

newEntity{ base = "BASE_SHOTGUN",
	name = "Mossberg 500",
	level_range = {5, 15},
	require = { stat = { str=11 }, },
	cost = 15,
	rarity = 50,
	combat = {
	},
}

newEntity{ base = "BASE_GUN",
	define_as = "BAZOOKA",
	name = "Easter Egg Bazooka",
	rarity = false,
	subtype = "bazooka",
	desc = [[This classic shoulder-mounted bazooka appears to have been modified.  The bore of the barrel is quite a bit narrower than it should be... about egg-sized in fact.]],
	combat = {
		range = 100,
		accuracy = 10,
		speed = 5,
	},
}

------------------ AMMO -------------------

newEntity{
	define_as = "BASE_AMMO",
	slot = "AMMO",
	type = "ammo",
	add_name = " (#COMBAT#)",
	display = "{", color=colors.UMBER,
	combat = {
		range_mod = 1,
		accuracy_mod = 1,
		speed_mod = 1,
	},
	ranged_ammo = "gun",
	desc = [[Ammo for shooting with.]],
	stacking = false,
	particle_on_hit = "bullet_impact",
	projectile_display = {
		display = "*",
		trail = "bullet_trail",
	},
}

newEntity{ base = "BASE_AMMO",
	define_as = "PISTOL_CLIP",
	subtype="pistol",
	desc = [[A clip of nine bullets.]],
	quantity = 9,
}

newEntity{ base = "PISTOL_CLIP",
	name = "9mm clip",
	level_range = {1, 10},
	encumbrance = 1,
	rarity = 5,
	require = { stat = { dex=10 }, },
	combat = {
		dam = 30,
		apr = 5,
	},
}

newEntity{ base = "BASE_AMMO",
	define_as = "SHOTGUN_MAGAZINE",
	subtype = "shotgun",
	name = "magazine of shotgun shells",
	desc = [[A series of shotgun shells are held together by some plastic.]],
	level_range = {5, 15},
	rarity = 50,
	quantity = 6,
	num_projectiles = 50,
	combat = {
		dam = 2.5,
	},
}

newEntity{ base = "BASE_AMMO",
	define_as = "EGG_BASKET",
	name = "easter egg basket",
	desc = [[A nice wicker easter egg basket with a brightly #RED#c#VIOLET#o#YELLOW#l#GREEN#o#ORANGE#r#PINK#e#BLUE#d #WHITE#eggs inside.]],
	rarity = false,
	subtype = "bazooka",
	combat = {
		dam = 100,
		apr = 5,
		physcrit = 1,
		radius = 2,
	},
	quantity = 24,
	projectile_display = {
		particle = "egg_splat",
	},
}